#ifndef USERSLISTWIDGET_H
#define USERSLISTWIDGET_H

#include <QWidget>
#include "userslistviewer.h"
#include "userlist.h"
#include <QButtonGroup>

class UsersListWidget : public QWidget
{
    Q_OBJECT
public:
    explicit UsersListWidget(UserList* list, QWidget *parent = 0);
    void setUsersList(UserList* list);
    void uninclude(const int&uid);
    QVariant itemData(int index, int role=Qt::UserRole);
    int currentIndex() const;
    void refresh();
private:
    UsersListViewer m_list;
    QButtonGroup m_filter;
signals:
    void currentIndexChanged(int index);
public slots:
    void setUser(const int&Index);
private slots:
    void setFilter(QAbstractButton* button);
};

#endif // USERSLISTWIDGET_H
